/* 管理后台移动端适配样式 */

/* 基础移动端适配 */
.sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 1001;
}

.sidebar.show {
    transform: translateX(0);
}

.main-content {
    margin-left: 0;
    transition: margin-left 0.3s ease;
}

.mobile-header {
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    padding: 15px 20px;
    display: none;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.mobile-menu-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #333;
    padding: 5px;
}

.mobile-menu-btn:hover {
    background: rgba(0,0,0,0.1);
    border-radius: 5px;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* 桌面端样式 */
@media (min-width: 992px) {
    .sidebar {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 250px;
    }
    .mobile-header {
        display: none !important;
    }
    .sidebar-overlay {
        display: none !important;
    }
}

/* 平板端样式 */
@media (max-width: 991.98px) and (min-width: 768px) {
    .mobile-header {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
    }
    .navbar {
        display: none;
    }
    .main-content {
        padding: 15px;
    }
    
    /* 卡片间距调整 */
    .stat-card, .content-card, .filter-card, .chart-container, .clue-table, .recent-clues {
        margin-bottom: 20px;
        padding: 15px;
    }
    
    /* 按钮组优化 */
    .btn-group {
        flex-wrap: wrap;
    }
    
    .btn-group .btn {
        margin-bottom: 5px;
    }
}

/* 移动端样式 */
@media (max-width: 767.98px) {
    .mobile-header {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        padding: 10px 15px;
    }
    
    .mobile-header h5 {
        font-size: 1.1rem;
        margin: 0;
    }
    
    .navbar {
        display: none;
    }
    
    .main-content {
        padding: 10px;
    }
    
    /* 卡片样式调整 */
    .stat-card, .content-card, .filter-card, .chart-container, .clue-table, .recent-clues {
        margin-bottom: 15px;
        padding: 15px;
        border-radius: 10px;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .stat-card h3 {
        font-size: 1.5rem;
    }
    
    .stat-card p {
        font-size: 0.9rem;
        margin-bottom: 0;
    }
    
    /* 表格响应式 */
    .table-responsive {
        border: none;
        font-size: 0.9rem;
    }
    
    .table th, .table td {
        padding: 0.5rem 0.25rem;
        font-size: 0.85rem;
        border-top: 1px solid #dee2e6;
    }
    
    /* 按钮适配 */
    .btn-action {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
        margin: 1px;
    }
    
    .btn-group-vertical .btn {
        margin-bottom: 5px;
        font-size: 0.85rem;
    }
    
    /* 表单适配 */
    .form-control, .form-select {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
    
    /* 模态框适配 */
    .modal-lg, .modal-xl {
        max-width: 95%;
        margin: 0.5rem;
    }
    
    .modal-dialog {
        margin: 0.5rem;
    }
    
    .modal-content {
        border-radius: 15px;
    }
    
    .modal-header {
        padding: 1rem;
        border-bottom: 1px solid #dee2e6;
    }
    
    .modal-body {
        padding: 1rem;
        max-height: 70vh;
        overflow-y: auto;
    }
    
    .modal-footer {
        padding: 0.75rem 1rem;
        border-top: 1px solid #dee2e6;
    }
    
    /* 筛选区域优化 */
    .filter-card .row > div {
        margin-bottom: 10px;
    }
    
    /* 分页适配 */
    .pagination {
        font-size: 0.85rem;
    }
    
    .pagination .page-link {
        padding: 0.375rem 0.5rem;
    }
    
    /* 下拉菜单适配 */
    .dropdown-menu {
        font-size: 0.9rem;
        min-width: 150px;
    }
    
    /* 图表容器适配 */
    .chart-container {
        padding: 15px 10px;
    }
    
    .chart-container canvas {
        max-height: 250px !important;
    }
}

/* 超小屏幕适配 */
@media (max-width: 575.98px) {
    .mobile-header {
        padding: 8px 10px;
    }
    
    .mobile-header h5 {
        font-size: 1rem;
    }
    
    .main-content {
        padding: 5px;
    }
    
    .col-md-3, .col-md-6, .col-lg-3, .col-lg-6, .col-md-4 {
        margin-bottom: 10px;
    }
    
    /* 卡片进一步压缩 */
    .stat-card, .content-card, .filter-card, .chart-container, .clue-table, .recent-clues {
        padding: 10px;
        margin-bottom: 10px;
    }
    
    .stat-card h3 {
        font-size: 1.3rem;
    }
    
    .chart-container h5, .content-card h5 {
        font-size: 1rem;
        margin-bottom: 10px;
    }
    
    .clue-item {
        padding: 8px;
        font-size: 0.85rem;
        margin-bottom: 8px;
    }
    
    /* 表格进一步压缩 */
    .table th, .table td {
        padding: 0.25rem 0.125rem;
        font-size: 0.75rem;
    }
    
    /* 按钮进一步压缩 */
    .btn-sm, .btn-action {
        padding: 0.125rem 0.25rem;
        font-size: 0.7rem;
    }
    
    /* 输入框压缩 */
    .form-control, .form-select {
        padding: 0.375rem 0.5rem;
        font-size: 0.85rem;
    }
    
    /* 模态框全屏化 */
    .modal-dialog {
        margin: 0;
        max-width: 100%;
        height: 100vh;
    }
    
    .modal-content {
        height: 100vh;
        border-radius: 0;
        border: none;
    }
    
    .modal-body {
        max-height: calc(100vh - 120px);
    }
    
    /* 图表适配 */
    .chart-container canvas {
        max-height: 200px !important;
    }
    
    /* 分页进一步简化 */
    .pagination {
        font-size: 0.75rem;
        justify-content: center;
    }
    
    .pagination .page-link {
        padding: 0.25rem 0.375rem;
    }
}

/* 横屏模式优化 */
@media (max-height: 500px) and (orientation: landscape) {
    .mobile-header {
        padding: 5px 10px;
    }
    
    .main-content {
        padding: 5px;
    }
    
    .modal-body {
        max-height: 60vh;
    }
    
    .chart-container canvas {
        max-height: 150px !important;
    }
}

/* 打印样式 */
@media print {
    .sidebar, .mobile-header, .sidebar-overlay {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
        padding: 0 !important;
    }
    
    .btn, .dropdown, .pagination {
        display: none !important;
    }
    
    .table {
        font-size: 0.8rem;
    }
    
    .stat-card, .content-card, .filter-card, .chart-container, .clue-table {
        box-shadow: none !important;
        border: 1px solid #dee2e6 !important;
    }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    .sidebar {
        background: #000 !important;
    }
    
    .mobile-header {
        border-bottom: 2px solid #000;
    }
    
    .stat-card, .content-card, .filter-card, .chart-container, .clue-table {
        border: 2px solid #000 !important;
    }
}

/* 减少动画模式支持 */
@media (prefers-reduced-motion: reduce) {
    .sidebar, .main-content, .sidebar-overlay {
        transition: none !important;
    }
    
    .stat-card {
        transition: none !important;
    }
    
    .stat-card:hover {
        transform: none !important;
    }
} 